The Album object

The album object represents an open album in the MyAlbum application.

Properties:

FullNameStringread-writeFull pathname of the album.
NameStringread-onlyBase filename of the album.
SavedBooleanread-writeTrue if the album doesn't need saving.
dateCreatedDateread-writeCreation date of the album.
dateLastSavedDateread-writeLast modification date of the album.
sAlbumTitleStringread-writeThe title of the album.
sAlbumCommentStringread-writeThe comment of the album.
sAlbumCopyrightStringread-writeThe copyright or information text of the album.
nbPictureLongread-onlyTotal number of pictures in the album.
nbSelectedPictureLongread-writeNumber of selected pictures in the album. Setting this property to zero will clear the entire selection and setting it to -1 will select all the pictures of the album.
nbFlaggedPictureLongread-writeNumber of flagged pictures in the album. Setting this property to zero will clear all the flags and setting it to -1 will put a flag on all the pictures of the album.
nbVisiblePictureLongread-onlyNumber of pictures present in the current window.
nCurrentPictureLongread-writeLogical number of the current picture.
nbKeywordLongread-onlyNumber of keywords in the album.
nbCustomFieldLongread-onlyNumber of custom fields in the album.
nDisplayModeLongread-writeDisplay mode and status for the album (see below).
sDSThumbnailStringread-writeDisplay string used for the thumbnail text.
sDSFullScreenStringread-writeDisplay string used for the comment in full-screen mode.
sDSToolTipStringread-writeDisplay string used for the thumbnails tool tips.
sDSFullCommentStringread-writeDisplay string used for the full comment window.
sDSPictureInfoStringread-writeDisplay string used for the picture info (right of the Info button).
bDisplayCommentBooleanread-writeDisplay or hide the comment during full-screen mode.
sPlayCmdStringread-writeBackground music command for the album.
bRandomModeBooleanread-writeSet or clear the random mode for the slideshow.
nDelaySlideshowLongread-writeDelay in tenths of second in automatic slideshow.
bSilentBooleanread-writeDisable or enable the background music during slideshow.
nActiveTabLongread-writeThe keyword id of the active tab (0 for none).
lCommentFlagsLongread-writeFlags for displaying the picture comment in full-screen mode (see below).
sICMInfoStringread-writeICM info for the album (string: "G:gamma_value").
nSlideSizeLongread-writeSize of the slides in pixel.
nThumbSizeLongread-writeBase thumbnail size in pixel.
nMarginSizeLongread-writeSpacing between the slides in pixel.
nCropModeLongread-writeCurrent cropping mode (see below).
nStretchModeLongread-writeMode used for resizing the pictures for display (see Resizing modes below). Not used when DirectDraw mode is selected.
sDateFormatStringread-writeFormat for displaying the Custom Fields of type Date.
sTimeFormatStringread-writeFormat for displaying the Custom Fields of type Time.

Methods:

Close(bNoPrompt As Boolean) As Boolean
Close the album.

Save() As Boolean
Save the album.

SaveAs(sFileName As String) As Boolean
Save the album under a new name.

AddPicture(pszPictureFile As String) As Object
Add a new picture to the album.

Activate()
Activate the first window associated with the album.

GetPicture(numPic As Long) As Object
Retrieve a picture in the album (first is 0) using absolute number.

GetVisiblePicture(numPic As Long) As Object
Retrieve a picture in the current window (first is 0) using logical number.

GetPictureByFileName(sFileName As String) As Object
Retrieve a picture by its filename (without path).

DeletePicture(pic As Object) As Boolean
Remove the specified picture from the album.

MovePicture(pic As Object, newPos As Long, bAfter As Boolean) As Boolean
Move a picture in an album. newPos is an absolute picture position.

RemoveOrphans() As Long
Remove the thumbnails that point to file that no longer exist.

Paste(sFileName As String) As Boolean
Paste the image from the Windows clipboard in the current album and save it in the specified file. The new picture is added at the end of the album.

PrintOut(nFrom As Integer, nTo As Integer) As Boolean
Print the album (pages nFrom to nTo).

PrintPreview() As Boolean
Displays the album on the screen, as it would appear printed.

AddKeyword(pszName As String) As Object
Add a new keyword to the album.

AddCustomField(pszName As String, nType As Integer) As Object
Add a new custom field to the album.

GetKeyword(numKW As Long) As Object
Retrieve a keyword (first is 0).

GetCustomField(numCF As Long) As Object
Retrieve a custom field (first is 0).

DeleteKeyword(Keyword As Object) As Boolean
Delete the specified keyword.

DeleteCustomField(CustomField As Object) As Boolean
Delete the specified custom field.

DisplayPicture(nMode As Long) As Boolean
Display the current picture using the specified mode:
  - DP_CURRENT (0): just display the current picture
  - DP_SLIDESHOW (1): start a manual slideshow
  - DP_AUTOSS (2): start an automatic slideshow

CloseDisplay() As Boolean
Close a slideshow or a full screen display.

ExpandMacro(pic As Object, pszMacro As String) As String Construct a display string.

ReDraw()
Refresh the display of the album.

SetFSDisplayMode(nMode As Long, bReset As Boolean) As Boolean Set the current full-screen mode.

CvtNumPic(numPic As long, bLog2Abs as Boolean) Convert between logical and absolute picture numbers.

NewPicture(w As Long, h As Long, bpp As Integer, crBack As Long) As Object
Creates a new temporary empty picture with a colored background. bpp is the color depth and should be set to 16, 24 or 32. The picture is added to the album at the end.

ReDrawFullScreen()
Redraws the full-screen display:

xmlDecodePicture(xmlString as String, sTargetFolder as String ) As Object
Add a new picture to the album and initialize it with the xml stream contained in the xmlString string. The picture is then saved in the sTargetFolder folder.

SetMacroValue(pic as Object, sMacro as String, sValue as String ) As Bool
Modify an object property via a Display String. Only mutable Display String can be used with this method. The pic parameter can be Null for modifying album-level properties.


Constants :

Display modes:

This is a 32 bit value containing various information:

Bit 0 to 7:Default full-screen mode:
   DM_NORMAL0Mode is normal (no zoom).
   DM_FITIMAGE1Pictures are resized to fit the screen.
   DM_ZOOM22Pictures are zoomed by 2.
   DM_ZOOM33Pictures are zoomed by 3.
   DM_ZOOM054Pictures are displayed half size.
   DM_SMART5Smart mode.
   DM_SHRINK6Pictures larger than the screen are resized.
   DM_ENLARGE7Picture smaller than the screen are resized.
   DM_FITHORZ8Adjust the picture to the height of the screen.
   DM_FITVERT9Adjust the picture to the width of the screen.
   DM_SIMPLEDRAW10Pictures are displayed with no zoom.
DM_NOCOMMENT0x00010000 Picture comments are not displayed.
DM_USEVIEWERFLAGS0x00020000MyAlbum will use the viewer flags.
DM_HIDENAVBAR0x00040000Viewer: do not display the navigation bar.
DM_USEDIRECTSHOWFORVIDEOS0x00080000Use DirectShow for playing videos.
DM_RELPATH0x00100000Album uses relative paths.
DM_HIDEPIC0x00200000Hidden picture are really hidden.
DM_AUTOFLIP0x00400000Slideshow is automatic.
DM_COMPRESSEDTH0x00800000Thumbnails are compressed in the alb file.
DM_USEDIRECTDRAW0x01000000Full screen display uses DirectDraw.
DM_SORTEDKW0x02000000The keywords are sorted.
DM_AUTOSTART0x04000000Viewer: album will start in slideshow mode.
DM_AUTOCLOSE0x08000000Viewer: viewer will close when exiting slideshow.
DM_RUNONCE0x10000000Viewer: slideshow will end after the last picture.
DM_NOCOPYPIC0x20000000Viewer: picture copy is not allowed.
DM_MONITORFOLDER0x40000000MyAlbum will automaticlly add new pictures from the last used folder.

Cropping modes :

CropMode_None0No cropping done on pictures.
CropMode_Track1Definition of the cropping rectangles.
CropMode_Crop2Cropping rectangles used when displaying pictures.

Comment Flags:

This is a 32 bit value containing various information:

FSC_TRANSPARENT0x0001Comment is transparent
FSC_SHADOWED0x0002Comment has a shadow
Bits 9 to 15:Comment position:
   FSC_POSLB0x0000Left, bottom
   FSC_POSLC0x0100Left, center
   FSC_POSLT0x0200Left, top
   FSC_POSCT0x0300Center, top
   FSC_POSRT0x0400Right, top
   FSC_POSRC0x0500Right, center
   FSC_POSRB0x0600Right, bottom
   FSC_POBC0x0700Bottom, center
   FSC_POSCC0x0800Screen center.

Resizing modes

BLACKONWHITE1For monochrome bitmaps, this mode preserves black pixels at the expense of white pixels.
WHITEONBLACK2For monochrome bitmaps, this mode preserves white pixels at the expense of black pixels.
COLORONCOLOR3This mode deletes all eliminated lines of pixels without trying to preserve their information.
HALFTONE4Maps pixels from the source picture into blocks of pixels in the destination picture. The average color over the destination block of pixels approximates the color of the source pixels (slower but better results).